package filesystem;
import java.util.Date;


public class File extends FSElement
{
	public File(String name, 
			 String owner, 
		 	 Directory parent,
		 	 Date created,
		 	 int size)
	{
		setName(name);
		setOwner(owner);
		setParent(parent);
		setCreated(created);
		setLastModified(created);
		setSize(size);
		setSizeCalculator(new FileSizeCalculator());
	}
	
	public String getInfo(String prefix)
	{
		String result = prefix + "File: " +getName() + "\tOwner: " + 
			getOwner() + "\tSize: " + getSize() + "\tCreated: " +getCreated().toString() + 
			"\tModified: " + getLastModified().toString() + "\n";		
			
		return result;
	}
}
